import Vue from 'vue'
import App from './App.vue'
// 导入
import VueRouter from 'vue-router'
// 导入路由文件
import router from "./router/index.js"
// 导入elementui组件
import { Button, Select, Container, Header, Main, Footer, Row, Table, TableColumn, Popover, Tag } from 'element-ui';

Vue.config.productionTip = false
// 添加插件
Vue.use(VueRouter);

Vue.component(Button.name, Button);
Vue.component(Select.name, Select);
Vue.component(Container.name, Container);
Vue.component(Header.name, Header);
Vue.component(Main.name, Main);
Vue.component(Footer.name, Footer);
Vue.component(Row.name, Row);
Vue.component(Table.name, Table);
Vue.component(TableColumn.name, TableColumn);
Vue.component(Popover.name, Popover);
Vue.component(Tag.name, Tag);

new Vue({
  render: h => h(App),
  router, // 注册路由
  beforeCreate() {
    Vue.prototype.$bus = this;
  }
}).$mount('#app')